"""
客户管理相关的数据模型
"""

from pydantic import BaseModel, EmailStr
from typing import Optional, Dict, Any


class CustomerCreateRequest(BaseModel):
    """创建客户请求模型"""
    email: EmailStr
    name: str
    phone: Optional[str] = None
    address: Optional[Dict[str, str]] = None
    metadata: Optional[Dict[str, str]] = None


class CustomerUpdateRequest(BaseModel):
    """更新客户请求模型"""
    email: Optional[EmailStr] = None
    name: Optional[str] = None
    phone: Optional[str] = None
    address: Optional[Dict[str, str]] = None
    metadata: Optional[Dict[str, str]] = None


class CustomerResponse(BaseModel):
    """客户响应模型"""
    id: str
    stripe_customer_id: str
    email: str
    name: str
    phone: Optional[str] = None
    address: Optional[Dict[str, str]] = None
    metadata: Dict[str, str]
    created_at: str
    updated_at: str
    is_active: bool
